import React from 'react';
import '../../style/emojiBox.less'
import {observer,inject } from "mobx-react";
@inject("emojiStore")
@observer
class EmojiBox extends React.Component{
    getEmoji(){
        let dom=[];
        for(let i=1;i<=100;i++){
            let url="https://demo.popoim.cn/static/h5/img/emotion/face01/"+i+".png";
            dom.push(<li onClick={(e)=>{
                 this.props.emojiStore.addEmoji(i);
            }
            } className="emojiBoxItem" key={i}>
                <img  src={url} alt="bq"/>
            </li>)
        }
        return dom;
    }
    componentWillUnmount(){

    }
    render() {
        return (
            <div className="emojiBox">
                <ul>
                    {this.getEmoji()}
                </ul>
            </div>
        )
    }
}

export default EmojiBox
